Controlling the Rover
At this point, you have heard the terms roverd
and roverctl
several times. In this guide we'll briefly describe how they work together, and by what other means you can control your Rover.
Elias Groot
Software Lead, Course Organizer
Why we Need roverd
In any (autonomous) system, we need a way to start, stop and manage processes. In a service-oriented system like the Rover, we also need a way to "connect" services, so that they can find and talk with each other. Additionally, we want to enforce only valid pipelines, in which all services are healthy so that we avoid eternally waiting for data from a crashed service.
These are the key reasons for the roverd
service execution engine. roverd
is short for rover daemon, a process that is always running and automatically starts when the debix boots. For every service in the pipeline it makes sure that it is started at virtually the same time as the other services, it monitors the service process and collects logs.
Interacting with roverd
is done through the HTTP REST API it exposes on port 80. You can see this for yourself if the debix is booted and you visit your rover IP in your browser. Try visiting http://192.168.0.1<ROVER_INDEX>/status
(e.g. http://192.168.0.103 for rover 3). All API endpoints are formally specified here but there is no need to read up on them. We have created a convenient API client for you that you already used to interact with your Rover: roverctl
.
The commands you issue using roverctl
are sent to the roverd
API, which will operate accordingly. This design allows for a lot more features, which we will go over step by step in later tutorials.
For those familiar with Kubernetes this design might ring a bell. It was inspired by the kubectl
utility.
More Control Using ssh
If you want control beyond what roverd
and roverctl
provide, you can also open an SSH terminal to your Rover. This is useful if you want to build or run services that rely on additional software that needs to be installed, or if you want to modify the debix' Linux installation. You can use the IP ranges as set up in the ASE labs to SSH into your Rover.
For example, if you want to SSH into Rover 7:
# Open ssh terminal
ssh debix@192.168.0.107
After which you can just run bash commands as you would normally:
$ debix > sudo apt update
If roverd
interferes with your workflow, you can disable the daemon service using systemctl
.